package com.hy.study.demo.complexquerydemo.bean.view;


import com.hy.study.demo.complexquerydemo.utils.Operator;

import java.util.Set;

/**
 * @author huyong
 * @description 查询组合条件
 * @date 2021/10/15
 **/
public class QueryCombinationCondition {

    /**
     * 字段名
     */
    private Set<String> field;
    /*
     *统一组中每个字段之间的的关系 例如 (a='xxx' and b='xxx') 中的AND
     */
    private Operator group;
    /*
    所属组 例如 select * from test where (a='xxx' and b='xxx') or (c='fff' and d='ggg') 其中  (c='fff' and d='ggg') 代表一个group
     *组与组直接的连接符合 默认and 每个组直接的操作关系 中的  or
     */
    private Operator groupOperator = Operator.AND;
    /*
     * 该组内部操作符合 OR  AND  KILE  等 默认 and (a='xxx' and b='xxx') 中的  =
     */
    private Operator operator = Operator.AND;


    public Set<String> getField() {
        return field;
    }

    public void setField(Set<String> field) {
        this.field = field;
    }

    public Operator getGroup() {
        return group;
    }

    public void setGroup(Operator group) {
        this.group = group;
    }

    public Operator getOperator() {
        return operator;
    }

    public void setOperator(Operator operator) {
        this.operator = operator;
    }

    public Operator getGroupOperator() {
        return groupOperator;
    }

    public void setGroupOperator(Operator groupOperator) {
        this.groupOperator = groupOperator;
    }


}
